<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        {{msg}}
    </div>
    <script src="../vue.js"></script>
    <script>
        let vm=new Vue({
            el:'#app',
            data () {
                return {
                    msg:'hello'
                }
            },
            methods: {
                handleClick(){
                    this.$nextTick(()=>{
                        console.log('所有dom更新后执行');
                    })
                }
            }
        })
        vm.msg='world';
        console.dir(vm.$el);
        console.dir(vm.$el.textContent);
        Vue.nextTick(function(){
            console.log(vm.$el.textContent=='world');  //false 有缩进
            console.log(vm.$el.innerText=='world');  //true
        })
    </script>
</body>
</html>